package com.tally.server.dto;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

public class MessageDTO {

    /**
     * id
     */
    private Integer id;

    /**
     * 发送者id
     */
    private Integer sendUserId;

    /**
     * 接收者id
     */
    private Integer recUserId;

    /**
     * 类型，点赞L，评论C，回复R
     */
    private String type;

    /**
     * 文章id
     */
    private String postId;

    /**
     * 操作时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    private Integer read;

    /**
     * 发送者信息
     */
    private UserDTO sendUser;

    /**
     * 相关文章信息
     */
    private PostDTO post;

    /**
     * 评论内容
     */
    private String content;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getSendUserId() {
        return sendUserId;
    }

    public void setSendUserId(Integer sendUserId) {
        this.sendUserId = sendUserId;
    }

    public Integer getRecUserId() {
        return recUserId;
    }

    public void setRecUserId(Integer recUserId) {
        this.recUserId = recUserId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getPostId() {
        return postId;
    }

    public void setPostId(String postId) {
        this.postId = postId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getRead() {
        return read;
    }

    public void setRead(Integer read) {
        this.read = read;
    }

    public UserDTO getSendUser() {
        return sendUser;
    }

    public void setSendUser(UserDTO sendUser) {
        this.sendUser = sendUser;
    }

    public PostDTO getPost() {
        return post;
    }

    public void setPost(PostDTO post) {
        this.post = post;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("MessageDTO{");
        sb.append("id=").append(id);
        sb.append(", sendUserId=").append(sendUserId);
        sb.append(", recUserId=").append(recUserId);
        sb.append(", type='").append(type).append('\'');
        sb.append(", postId='").append(postId).append('\'');
        sb.append(", createTime=").append(createTime);
        sb.append(", read=").append(read);
        sb.append(", sendUser=").append(sendUser);
        sb.append(", post=").append(post);
        sb.append(", content='").append(content).append('\'');
        sb.append('}');
        return sb.toString();
    }
}